import { request } from '@/common/utils/request'

// ? 登录
export const loginApi = (data) => {
    return request({
        url: '/h5/login',
        method: 'POST',
        data
    })
}

// 用户信息
export const getInfoApi = (data) => {
    return request({
        url: '/auth/b/getLoginUser',
        method: 'GET',
        data
    })
}

//? 更新人脸
export const updateFaceImgApi = (data) => {
    return request({
        url: '/h5/updateFaceImg',
        method: 'POST',
        data
    })
}

// 修改密码 .
export const updatePasswordApi = (data) => {
    return request({
        url: '/sys/userCenter/updatePassword',
        method: 'POST',
        data
    })
}

// 权限控制
export const menuListRoleApi = (data) => {
    return request({
        url: '/h5/getPermissionList',//'/sys/userCenter/loginMenu',
        method: 'GET',
        data
    })
}

// IChangan授权登录
export const authLoginApi = (data) => {
    return request({
        url: '/auth/b/doLogin',
        method: 'POST',
        data
    })
}

// ? 绑定IChangan工号
export const bindIChanganAccountApi = (data) => {
    return request({
        url: '/h5/bindIChanganAccount',
        method: 'POST',
        data
    })
}

// 获取角色分页 .
export const rolePageApi = (data) => {
    return request({
        url: '/sys/role/page',
        method: 'GET',
        data
    })
}

// 登出
export const doLogoutApi = (data) => {
    return request({
        url: '/auth/b/doLogout',
        method: 'GET',
        data
    })
}

// 获取人员详情
export const userDetail = (data)=> {
  return request({
    url:  '/biz/user/detail',
    method: 'GET',
    data
  })
}
// 获取角色选择器
export const roleSelector = (data)=> {
  return request({
    url:  '/biz/user/roleSelector',
    method: 'GET',
    data
  })
}



